Remove endian-sensitivity from hash slow path
authorBenjamin Barenblat <bbaren@google.com>
Tue, 9 Feb 2021 19:41:06 +0000 (19:41 +0000)
committerBenjamin Barenblat <bbaren@debian.org>
Tue, 9 Feb 2021 19:41:06 +0000 (19:41 +0000)
commita39ecd2439a365f4328ada49bb2a5378c462f468
tree976f5ca09afec27873839880f3272bf5ccdddbc7
parentec463970680b33613565541b2db2a0d8a65cc594
Remove endian-sensitivity from hash slow path

Forwarded: yes
Applied-Upstream: https://github.com/abseil/abseil-cpp/commit/9c6a50fdd80bb39fabd95faeda84f04062685ff3

Prior to this commit, the Abseil hash fast path was endian-agnostic, but
the slow path assumed a little-endian platform. Change the slow path to
be endian-correct, ensuring that values produced by the fast and slow
paths are equal even on big-endian systems.

The author works at Google. Upstream applied this patch as Piper revision
355424258 and exported it to GitHub; the Applied-Upstream URL above points to
the exported commit.

Gbp-Pq: Name endian-hash.diff
absl/hash/BUILD.bazel
absl/hash/CMakeLists.txt
absl/hash/internal/hash.h